<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>天气</title>
	<style type="text/css">
		body,html,#allmap{width:100%;height:80%;overflow:hidden;
		margin:0;font-family:"微软雅黑";}
	
	</style>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=DD279b2a90afdf0ae7a3796787a0742e"></script>
	<title>地图展示</title>
</head>
<body>
	<form action="/first.do" method="POST">
		<div id="page"style="text-align:center;">
			<input type="text" name="city" id="name" value="" placeholder="请输入城市的名称" /><br/>
			<input type="submit" id="submit" value="提交"/>
		</div>
	</form>
	
	<div id="allmap"></div>
	
	<c:forEach items="${city.forecast}" var="forecast">
			<div id="aa">
				城市:${forecast.city}<br/>
				日期:${forecast.date} <br/>
		 		最高温度:${forecast.high} <br/> 
				持续风向:${forecast.fx} <br/>
				最低温度:${forecast.low} <br/>
				风力:${forecast.fl} <br/>
				天气：${forecast.type} <br/>
			</div>
	</c:forEach>
	
</body>
	
</html>
<script type="text/javascript">

	// 百度地图API功能
	var map = new BMap.Map("allmap");    // 创建Map实例
	map.centerAndZoom(new BMap.Point(114.06667,22.61667), 12);  // 初始化地图,设置中心点坐标和地图级别
	map.addControl(new BMap.MapTypeControl());   //添加地图类型控件
	map.setCurrentCity("深圳");          // 设置地图显示的城市 此项是必须设置的
	map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
	
</script>